<div class="easyui-layout" data-options="fit:true">
    <div data-options="region:'north'" class="center">

        <div class="webmap">
            <p class="webmaptip">当前位置:</p>
            <a href="javascript:;" class="easyui-link" data-options="plain:true">借款管理</a>
            <p class="webmaptip">></p>
            <a href="javascript:;" class="easyui-link" data-options="plain:true">项目管理</a>
        </div>
        <div class="querybtn">
            <a id="paybackPlanQuery" href="javascript:;" class="easyui-linkbutton info"
               data-options="iconCls:'fa fa-search'">还款计划查询</a>
            <!--<a id="add" href="javascript:;" class="easyui-linkbutton warning" data-options="iconCls:'fa fa-plus'">添加</a>
            <a id="edit" href="javascript:;" class="easyui-linkbutton danger" data-options="iconCls:'fa fa-pencil'">编辑</a>
            <a id="del" href="javascript:;" class="easyui-linkbutton success" data-options="iconCls:'fa fa-remove '">删除</a>-->
        </div>

    </div>
    <div data-options="region:'center'" class="center">
        <table id="list" rownumbers="true"></table>
    </div>
</div>

<div id="paybackPlanListByTargetId" class="easyui-window"></div>

<script type="text/javascript">
    var listUrl = "/loan/list";
    var paybackPlanListUrl = 'page/project/paybackPlanList.html';

    var columns = [[
        /*{
         field: 'id',
         checkbox: true
         },*/ {
            field: 'appName',
            title: '姓名',
        }, {
            field: 'appMobile',
            title: '手机号',
        }, {
            field: 'appAmount',
            title: '申请金额（万元）',
            align: 'right',
            formatter: function (value, row, index) {
                if (value) {
                    return value.formatMoney();
                }
                return value;
            }
        }, {
            field: 'cityName',
            title: '城市',
        }, {
            field: 'appSource',
            title: '来源',
            formatter: function (value, row, index) {
                if (value == "1") {
                    return "pc端"
                } else if (value == "2") {
                    return "微信"
                } else {
                    return "app端"
                }
            }
        }, {
            field: 'createdDate',
            title: '申请时间',
        }, {
            field: 'appStatus',
            title: '状态',
            formatter: function (value, row, index) {
                if (value == "01") {
                    return "申请中"
                } else if (value == "02") {
                    return "审核中"
                } else if (value == "03") {
                    return "审核通过"
                } else {
                    return "审核失败"
                }
            }
        }]];
    list.init({url: listUrl, columns: columns, singleSelect: true});

    $("#paybackPlanQuery").click(function () {
        $('#paybackPlanListByTargetId').window('open').window("center").window('refresh', paybackPlanListUrl);
    });

</script>